home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 4307 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: cs.ruu.nl!usenet
  2. From: Wessel Dankers <wsldanke@cs.ruu.nl>
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: x ^= y ^= x ^= y;
  5. Date: Tue, 27 Feb 1996 09:45:50 +0100
  6. Organization: Universiteit Utrecht, Dept. of Computer Science
  7. Message-ID: <3132C4BE.2D60@cs.ruu.nl>
  8. References: <1286.6624T1439T237@cs.ruu.nl> <3Du8y*20g@yaps.rhein.de>
  9. NNTP-Posting-Host: dis.cs.ruu.nl
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0 (X11; I; HP-UX A.09.05 9000/712)
  14. CC: arno@yaps.rhein.de
  15.  
  16. Arno Eigenwillig wrote:
  17. > In article <1286.6624T1439T237@cs.ruu.nl>, Wessel Dankers writes:
  18. > > Which can of course be rewritten as:
  19. > >
  20. > >  x ^= y;
  21. > >  y ^= x;
  22. > >  x ^= y;
  23. > Yes.
  24. > > or if you want it real fancy:
  25. > >
  26. > >  x ^= y ^= x ^= y;
  27. > No. Reread your C text book and find out about sequence points, side
  28. > effects, and which combinations of them are not allowed.
  29.  
  30. If you would have taken a quick peek yourself you would have seen that an
  31. assignment has a return-value of itself. Anyway, I tested it and it worked.
  32.  
  33. --
  34. Wessel Dankers <wsldanke@cs.ruu.nl>
  35.  
  36. `Never imagine yourself not to be otherwise than what it might appear to
  37. others that what you were or might have been was not otherwise than what
  38. you had been would have appeared to them to be otherwise.'
  39.